package Text_65;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Code {

	public static void main(String[] args) {
		 //随机
        //1.
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"张三","李四","王五","小六","七七");
        Random r = new Random();
        int index = r.nextInt(list.size());
        System.out.println(list.get(index));
        //2.
        Collections.shuffle(list);
        String n = list.get(0);
        System.out.println(n);

	}

}
